package com.eigaland.change_machine.business.transaction_list

import androidx.lifecycle.MutableLiveData
import com.eigland.eigaland_lib.base.BaseVM
import movie6.posprintercept2.extensions.customLaunch

public class TransactionListFragmentVM : BaseVM(){

    var isSearch = false

    var repository = TransactionListRepository()

    var transactionListLiveData = MutableLiveData<ArrayList<TransactionListItemVM>>()

    var page = 1

    fun search(){

    }

    override fun initData() {
        customLaunch({
            var result = repository.loadTransactionList(page)
            if(result.errorMsg.isNotEmpty() ){

            } else {
                transactionListLiveData.postValue(result.transactionList)
            }

        })
    }

    fun loadTransaction(){

    }

    override fun destroy() {

     }

    override fun saveData() {

    }

    override fun onResume() {

    }

}